package top.sjydzq.www.controller.Mall;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import top.sjydzq.www.bean.Notice;
import top.sjydzq.www.service.NoticeService;

@Controller
public class NoticeController {
    @Autowired
    private NoticeService noticeService;

    @RequestMapping("/notice")
    public String notice(int id, Model model) {
        Notice notice = noticeService.selectById(id);

        model.addAttribute("notice", notice);

        return "Mall/Modal/notice";
    }
}
